package com.hooper.emun;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 *
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    SERVICE_ERROR(2012, "服务异常"),
    DATA_ERROR(204, "数据异常"),


    LOGIN_AUTH(208, "未登陆"),
    PERMISSION_NOT_ENOUGH(209, "没有权限"),
    PARAM_ERROR(210, "参数错误"),
    NULL_PARAM(211, "参数为空"),
    ROLE_EXIST(212, "该用户已存在该角色"),
    USER_NOT_EXIST(213, "用户不存在"),
    USER_BANNED(214, "用户已被禁用"),
    TOKEN_EXPIRED(215, "token已过期");

    private Integer code;

    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}